// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'
import store from './store'
import common from './common.js'
Vue.use(MintUI)
Vue.config.productionTip = false


Vue.use(common)
import   "font-awesome.css/css/font-awesome.css"
import initRichText from './initHTMLEditor';
initRichText();

/* eslint-disable no-new */
var vue=new Vue({

  el: '#app',
  store,//使用store
  router,
  components: { App },
  template: '<App/>',
  method:{

  },
  watch:{
     '$store.state.dataChanged'(r1,r2){
       // alert("deal  code")
      let url=this.dealCode(window.location.href);


       console.log('watchurl'+url);
       // alert("验签地址1:"+url+',实际地址:'+window.location.href)


       // this.initWeChat(url);

     }
  }

})



router.afterEach((to, from) => {
  let url=window.location.protocol+"//"+window.location.host+to.fullPath;
  console.log('to url'+url);
  // if(!!sessionStorage.getItem('openid'))
    // this.initWeChat(url,'');

})
